#pragma once

#include "base_lights.h"

/*设备led GPIO接口*/
typedef int (*device_lights_init_fn_t)(void);
typedef int (*device_lights_set_fn_t)(unsigned char state);
struct device_lights_i
{
    device_lights_init_fn_t lights_init;
    device_lights_set_fn_t  lights_set;
};
int device_led_init();
int device_led_set(unsigned char state);

/*外部调用接口*/
struct io_lights
{
    struct Lighter_i *interface;
    struct device_lights_i *device;
    unsigned char lights_state;
};
int io_lights_init(struct io_lights *self);
int io_lights_start(struct io_lights *self);
int io_lights_stop(struct io_lights *self);
int io_lights_get_state(struct io_lights *self);
